package Test;

public class Student implements Comparable<Student>{

    private int age;
    private float tall;
    private String gender;

    public Student(int age, float tall, String gender) {
        this.age = age;
        this.tall = tall;
        this.gender = gender;
    }

    @Override
    public String toString() {
        return "age: "+ age +" tall: " + tall + " gender: " + gender;
    }

    @Override
    public int compareTo(Student o) {
        if(this.age > o.age){
            return 1;
        }else if(o.age > this.age){
            return -1;
        }
        return 0;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public float getTall() {
        return tall;
    }

    public void setTall(float tall) {
        this.tall = tall;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }


}
